﻿'Author : Ahmad M. Abdan
'Cration Date : 17/1/2009
'Descreption : Procedure of Material Request Page 

Public Class DBEmployeeSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", Data.SqlDbType.NVarChar)
    Public EMP_ID As New TableField("EMP_ID", Data.SqlDbType.Int)
    Public emp_Num As New TableField("emp_Num", Data.SqlDbType.NVarChar)
    Public FName As New TableField("FName", Data.SqlDbType.NVarChar)
    Public LName As New TableField("LName", Data.SqlDbType.NVarChar)
    Public Emp_Type As New TableField("Emp_Type", Data.SqlDbType.Int)
    Public Gender As New TableField("Gender", Data.SqlDbType.Int)
    Public DateofBirth As New TableField("DateofBirth", Data.SqlDbType.DateTime)
    Public Designation As New TableField("Designation", Data.SqlDbType.Int)
    Public CompanyGroup As New TableField("CompanyGroup", Data.SqlDbType.Int)
    Public Company As New TableField("Company", Data.SqlDbType.Int)
    Public Department As New TableField("Department", Data.SqlDbType.Int)
    Public Project As New TableField("Project", Data.SqlDbType.Int)
    Public Emp_Status As New TableField("Emp_Status", Data.SqlDbType.Int)
    Public Remarks As New TableField("Remarks", Data.SqlDbType.NVarChar)


    Sub New()
        MyBase.StoredProcedureName = "EmployeeSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal EMP_ID As String = "", _
                                 Optional ByVal emp_Num As String = "", _
                                 Optional ByVal FName As String = "", _
                                 Optional ByVal LName As String = "", _
                                 Optional ByVal Emp_Type As String = "", _
                                 Optional ByVal Gender As String = "", _
                                 Optional ByVal DateofBirth As String = "", _
                                 Optional ByVal Designation As String = "", _
                                 Optional ByVal CompanyGroup As String = "", _
                                 Optional ByVal Company As String = "", _
                                 Optional ByVal Department As String = "", _
                                 Optional ByVal Project As String = "", _
                                 Optional ByVal Emp_Status As String = "", _
                                 Optional ByVal Remarks As String = "") As Object

        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.EMP_ID.SetValue(EMP_ID, MyBase.FieldsArrayList)
        Me.emp_Num.SetValue(emp_Num, MyBase.FieldsArrayList)
        Me.FName.SetValue(FName, MyBase.FieldsArrayList)
        Me.LName.SetValue(LName, MyBase.FieldsArrayList)
        Me.Emp_Type.SetValue(Emp_Type, MyBase.FieldsArrayList)
        Me.Gender.SetValue(Gender, MyBase.FieldsArrayList)
        Me.DateofBirth.SetValue(DateofBirth, MyBase.FieldsArrayList)
        Me.Designation.SetValue(Designation, MyBase.FieldsArrayList)
        Me.CompanyGroup.SetValue(CompanyGroup, MyBase.FieldsArrayList)
        Me.Company.SetValue(Company, MyBase.FieldsArrayList)
        Me.Department.SetValue(Department, MyBase.FieldsArrayList)
        Me.Project.SetValue(Project, MyBase.FieldsArrayList)
        Me.Emp_Status.SetValue(Emp_Status, MyBase.FieldsArrayList)
        Me.Remarks.SetValue(Remarks, MyBase.FieldsArrayList)
        Return MyBase.QueryDatabase(QueryType)
    End Function

End Class
